package cn.tedu.yhg.good.controller;

import cn.tedu.yhg.base.response.JsonResult;
import cn.tedu.yhg.good.pojo.dto.GoodQuery;
import cn.tedu.yhg.good.pojo.dto.GoodSaveParam;
import cn.tedu.yhg.good.pojo.entity.Good;
import cn.tedu.yhg.good.pojo.vo.GoodVO;
import cn.tedu.yhg.good.service.GoodService;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.BeanUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

import java.util.List;

@Slf4j
@RestController
@RequestMapping("/v1/good")
public class GoodController {
    @Autowired
    private GoodService goodService;



    @PostMapping("save")
    public JsonResult saveGood(@RequestBody GoodSaveParam goodSaveParam){
//        System.out.println("goodSaveParam = " + goodSaveParam);
        goodService.save(goodSaveParam);
        return JsonResult.ok();
    }

}
